@extends('layouts.admin')


@section('styles')
    <link href="//cdn.bootcss.com/select2/4.0.1/css/select2.min.css" rel="stylesheet">
@endsection

@section('content')
    <div class="well">
        <h1 class="text-center" >{{$movie->full_name}}</h1>
        {!! Form::open(['route' => 'movie.swapStore', 'method' => 'post']) !!}
        {!! Form::label('epid', 'episode list multiple selectable', ['class' => 'control-label']) !!}
        {!! Form::select('epId[]', $movieEpList , null , ['class' => 'form-control','id'=>'episodeID','multiple']) !!}
        {!! Form::label('movieId', 'movie list', ['class' => 'control-label']) !!}
        {!! Form::select('movieId', $movieList , null , ['class' => 'form-control','id'=>'movieID',]) !!}
        {!! Form::submit('Submit', ['class' => 'form-control btn btn-danger']) !!}
        {!! Form::close() !!}
    </div>
    <div class="well">
        <h1 class="text-center" >{{$movie->full_name}}</h1>
        {!! Form::open(['url' => 'swapMovieEpByName', 'method' => 'post']) !!}
        @foreach($movieEpList as $key=>$name)
            <div class="checkbox">
                <label>
                	{!! Form::checkbox('epIDs[]',$key, null,  []) !!}
                	{{$name}}
                </label>
            </div>
        @endforeach
        <div class="form-group">
            {!! Form::label('showNameEn', '电影英文名字', ['class' => 'control-label']) !!}
            {!! Form::text('showNameEn', null , null , ['class' => 'form-control']) !!}
        </div>

        {!! Form::submit('Submit', ['class' => 'form-control btn btn-danger']) !!}
        {!! Form::close() !!}
    </div>



@endsection




@section('scripts')
    <script src="//cdn.bootcss.com/select2/4.0.1/js/select2.full.min.js"></script>
    <script>

        $('#movieID').select2({
            placeholder:'choose a tag',
        });
    </script>

@endsection
